The invention is related to the field of image processing.
The use of spatial classes has been shown to improve the results of spatial filtering. One technique is to threshold each pixel in the class tap to form a corresponding binary value. The binary values are then used to select the spatial class. However, this technique does not scale to a large number of classes, because the number of spatial classes increases exponentially with the size of the classification tap. For example, a diamond tap classifier with radius 1, has 5 taps providing 25=32 spatial classes. A diamond tap with radius 2, has 13 taps providing 213=8192 classes. Larger taps require millions of classes.
A second limitation with the binary-threshold classification is that it is sensitive to errors and changes in a single pixel. This sensitivity adds some randomness to the classification, driving the classes more towards mono-class behavior than they would otherwise have. While this provides smooth class transitions, it limits performance.
A method and apparatus for enhancing image resolution by determining a nearest neighbor class for an input image vector from a plurality of spatial classes are disclosed. In one embodiment, the nearest neighbor class is determined by first receiving the input image vector that is to be classified into one of several spatial classes. Each spatial class has a corresponding normalized mean class vector. The input image vector is normalized. Then, the weighted distances from the normalized image vector to each normalized mean class vector are determined. The class vector which is the nearest neighbor class to the input image vector is determined based on the weighted distances. A filter corresponding to the nearest neighbor class is applied to the input image vector to enhance the resolution of the image.